package test

import (
	"game_server/dao/room"
	"game_server/framework/global"
	"game_server/framework/message"
	"game_server/framework/task"
	"game_server/proto"
)

func TestHandler(taskWrapper *task.TaskWrapper) *task.TaskWrapper {
	defer global.Logger.Info("package:[test]:::function:[TestHandler]<======")
	global.Logger.Info("======>package:[test]:::function:[TestHandler]")

	rooms := room.QueryAll()
	global.Logger.Info("rooms:", rooms)

	messageWrapper := &message.MessageWrapper{
		Code: proto.TEST,
		Data: "test===>TestHandler",
	}
	senderIds := []int64{taskWrapper.ReceiverId}
	task := &task.TaskWrapper{
		ReceiverId:     taskWrapper.ReceiverId,
		MessageWrapper: messageWrapper,
		SenderIds:      senderIds,
	}
	return task
}
